#ifndef VECTOR_D_H_
#define VECTOR_D_H_

#include <math.h>
#include <vector>
#include "dataType.h"

class VectorD {
public:
	VectorD();

	DATA_TYPE& operator[] (int x) { return elements_[x]; }
	const DATA_TYPE& operator[] (int x) const { return elements_[x]; }

	DATA_TYPE getSquaredNorm() const;
	DATA_TYPE normalize();
	VectorD operator+(const VectorD& rhs) const;
	VectorD operator-(const VectorD& rhs) const;

	static unsigned int getDimensions() { return DIMENSIONS; }
	static void setDimensions(unsigned int d) { DIMENSIONS = d; }

	static VectorD gaussianRandomVector();
protected:
	std::vector<DATA_TYPE> elements_;

	static unsigned int DIMENSIONS;
};

DATA_TYPE operator*(const VectorD& lhs, const VectorD& rhs);
VectorD operator*(DATA_TYPE lhs, const VectorD& rhs);

#endif